package com.pheruagor.handmanager.controller {
    import com.pheruagor.handmanager.view.ClubCreationPopUpMediator;
    import com.pheruagor.handmanager.view.component.ClubCreationPopUp;

    import flash.display.DisplayObject;

    import mx.managers.PopUpManager;

    import org.puremvc.as3.interfaces.INotification;
    import org.puremvc.as3.patterns.command.SimpleCommand;

    public class OpenClubCreationPopUpCommand extends SimpleCommand {
        public static const NAME:String = "openClubCreationPopUpCommand";

        override public function execute(notification:INotification):void {
            var popupContainer:DisplayObject = DisplayObject(notification.getBody());
            var popup:ClubCreationPopUp = new ClubCreationPopUp();
            facade.registerMediator(new ClubCreationPopUpMediator(popup));
            PopUpManager.addPopUp(popup, popupContainer, true);
            PopUpManager.centerPopUp(popup);
        }
    }
}